package Game.Players.Units;

/**
 * Created by sech_92 on 17.12.2014.
 */
public class HeavyMachines extends Unit {
    private int armor;
    Weapons[] weapon = {null, null, null};

    private HeavyMachines(String _name, int _health, int _armor, THeavyMachines type) {
        name = _name;
        health = _health;
        armor = _armor;
        level = 5;
        squadSize = 1;
        Weapons.makeWeaponz(type, weapon);
    }

    public static HeavyMachines make(THeavyMachines type) {
        HeavyMachines constr;
        switch (type) {
            case Predator:
                constr = new HeavyMachines("Predator", 1000, 30, type);
                break;
            case Chaos_Predator:
                constr = new HeavyMachines("Chaos Predator", 1000, 30, type);
                break;
            case Destroyer:
                constr = new HeavyMachines("Destroyer", 1000, 30, type);
                break;
            case Heavy_Destroyer:
                constr = new HeavyMachines("Heavy Destroyer", 1000, 30, type);
                break;
            case Lord_Destroyer:
                constr = new HeavyMachines("Lord Destroyer", 1000, 30, type);
                break;
            case Looted_Leman_Russ:
                constr = new HeavyMachines("Looted Leman Russ", 1000, 30, type);
                break;
            case Fire_Prism:
                constr = new HeavyMachines("Fire Prism", 1000, 30, type);
                break;
            case Falcon:
                constr = new HeavyMachines("Falcon", 1000, 30, type);
                break;
            case Leman_Russ:
                constr = new HeavyMachines("Leman Russ", 1000, 30, type);
                break;
            case Skyray_gunship:
                constr = new HeavyMachines("Skyray gunship", 1000, 30, type);
                break;
            case Hammerhead_gunship:_gunship:
                constr = new HeavyMachines("Hammerhead gunship", 1000, 30, type);
                break;
            default:
                constr = new HeavyMachines("", 0, 0, null);
                break;
        }
        return constr;
    }

    public int getArmor(){
        return armor;
    }

    public void decreaseArmor(int a){
        armor -= (a < 0 ? 0 : a);
    }
}
